import {request} from '@umijs/max';
import * as API from "@/services";
import {EntityId, PageQueryParams} from "kf-web-library";



/** 通知提醒表 分页检索请求 */
export async function queryNotifyRemind(params: API.NotifyRemindPageQueryParams): Promise<API.RespPageResult<API.NotifyRemind>> {
  return request('/api/v1/notify-remind', {
    params,
  });
}
/** 设置为已读 **/
export async function readNotifyRemind(id: API.EntityId): Promise<API.RespResult<boolean>> {
  return request(`/api/v1/notify-remind/${id}/read`, {
    method: 'PUT',
  });
}
/** 设置为已读 **/
export async function readAllNotifyRemind(): Promise<API.RespResult<boolean>> {
  return request(`/api/v1/notify-remind/read`, {
    method: 'PUT',
  });
}






/** 公告 分页检索请求 */
export async function queryNotifyAnnounce(params: API.NotifyAnnouncePageQueryParams): Promise<API.RespPageResult<API.NotifyAnnounce>> {
  return request('/api/v1/notify-announce', {
    params,
  });
}

/** 设置为已读 **/
export async function readNotifyAnnounce(id: API.EntityId): Promise<API.RespResult<boolean>> {
  return request(`/api/v1/notify-announce/${id}/read`, {
    method: 'PUT',
  });
}
/** 设置为已读 **/
export async function readAllNotifyAnnounce(): Promise<API.RespResult<boolean>> {
  return request(`/api/v1/notify-announce/read`, {
    method: 'PUT',
  });
}
